home *** CD-ROM | disk | FTP | other *** search
-
- ClickForMenu
- V1.10
- 8 Mar 1996
-
-
- Frantisek Dufka
- Hlavni 218
- 687 25, Hluk
- Czech Republic
-
- e-mail: dufkaf@risc.upol.cz
-
- This program is public domain. You can freely distribute it as long as you
- keep all the files unchanged. You are using it on your own risk.
-
-
- I hate writing documentation, so let's do it briefly.
-
- This little commodity changes the way intuition menus work.
-
- With ClickForMenu activated, menu is selected by clicking the right mouse
- button. There's no need to hold it. Menu item selection is completed by
- clicking left or right button. Middle button selects item, but does not exit,
- so you can use it for checking multiple checkmarks. The old way of using menu
- (hold - move - release) works too, so no one will be confused.
-
- Tested only on my A1200/030/28Mhz, but should work also on 68000 based
- machines with OS 2.0.
-
- Of course you can use MagicMenu instead - it' bigger and better. :)
-
-
- FEATURES/TOOLTYPES ADDED SINCE LAST RELEASE :
-
- POPSCREEN
-
- - pop screen with active menu to front.
-
- MOUSEMOVE=x
-
- If moved more then x pixels while holding right button, the old way of menu
- selection (hold-select-release) will be used. Just leave it untouched.
-
- FEATURES STILL MISSING :
-
- - Right mouse button should cancel menu like in Magic Menu.
- - keyboard control
- - nice icon :-)
-
- (VERY) TECHNICAL INFO :
-
- Program installs custom CxObject via commodities.library, which monitors all
- input events. Event of releasing right mouse is swalowed if the menu is on
- (flag WFLG_MENUSTATE is set in IntuitionBase->ActiveWindow->Flags). Event of
- clicking left or right button is changed into releasing of right button, and
- middle button click is changed into left button click. That's all. No system
- function is patched. No other high priority task, which can cause crash or
- deadlock is running.
-
- The POPSCREEN feature is a kind of hack. Screen popping is done via
- ScreenToFront() function from intuition.library, but all the code of custom
- CxObject runs as a part of input.device task, and it is not safe to call
- any complex dos or intuition functions from tasks. It seems to work under
- OS 3.0, but I cannot guarantee this for any other OS version. If it doesn't
- work, just tell me. I'll rewrite it in a more clean way.
-
- Because ScreenToFront() does not work when menu is already on, it have to be
- done before intuition draws menu and sets WFLG_MENUSTATE in
- ActiveWindow->Flags. So it's not possible to find out if the menu actualy will
- be drawn or not. ClickForMenu will bring screen to front only if right mouse
- button is pressed, left button is not pressed and ActiveWindow->MenuStrip is
- not NULL. This does not guarantee than menu will be really drawn, but is
- sufficient for most cases. Sometimes, when program utilises right button also
- for other things than intuition menu via WFLG_RMBTRAP (like Personal Paint for
- drawing), screen will be popped to front. This is harmless, but may be
- confusing. Unfortunately I can do nothing about it. Other programs, which may
- cause similar problems are commodities like MCP or MultiCX which traps right
- mouse button for different actions. This can be solved by setting CX_PRIORITY
- of such commodities higher than CX_PRIORITY of ClickForMenu.
-
- I hope you will find these bytes useful. Any ideas, suggestions, questions or
- donations are welcome.
-
- Frantisek Dufka
-
- P.S. Sorry for my english, but it's not my native language.
-
-